﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class CoinRefresher : MonoBehaviour
{
    // Start is called before the first frame update
    public bool IsOwnSide = true;
    Side m_Side;
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if(IsOwnSide) {
            m_Side = VSController.Instance.GetCurrSide();
        }
        else {
            m_Side = VSController.Instance.GetOppositeSide();
        }
        GetComponent<Text>().text = m_Side.Coin.ToString();
    }
}
